##Get results from STATA: General Sample
stataRes <- read.csv(file = paste0(resultsDir,"/Switch/naive_estimates_migrants.csv"), stringsAsFactors = FALSE)
stataFeasibleRes <- read.csv(file = paste0(resultsDir,"/Switch/feasible_nonfe_estimates_migrants.csv"), stringsAsFactors = FALSE)

honoreNaiveResultsDistance <- cbind(as.data.frame(c("Naive:All","Naive:Restricted","Naive:AllNoLagDV","Naive:RestrictedNoLagDV"),stringsAsFactors = FALSE),
                                    as.data.frame(rbind(c(as.numeric(stataRes[3:4,'base'])),
                                                        c(as.numeric(stataRes[3:4,'honore'])),
                                                        c(as.numeric(stataRes[3:4,'baseNoSC'])),
                                                        c(as.numeric(stataRes[3:4,'honoreNoSC'])))))
colnames(honoreNaiveResultsDistance) <- c('Type','Estimate','Std. Error')
rownames(honoreNaiveResultsDistance) <- honoreNaiveResultsDistance[,1]

honoreNaiveResultsSC <- cbind(as.data.frame(c("Naive:All","Naive:Restricted","Naive:AllNoLagDV","Naive:RestrictedNoLagDV"),stringsAsFactors = FALSE),
                              as.data.frame(rbind(c(as.numeric(stataRes[5:6,'base'])),
                                                  c(as.numeric(stataRes[5:6,'honore'])),
                                                  c(as.numeric(stataRes[5:6,'baseNoSC'])),
                                                  c(as.numeric(stataRes[5:6,'honoreNoSC'])))))
colnames(honoreNaiveResultsSC) <- c('Type','Estimate','Std. Error')
rownames(honoreNaiveResultsSC) <-honoreNaiveResultsSC[,1]

##R Results
load(paste0(datDir,'honoreFE_results_minPpl_all_',minZipHospPpl,'cutAge',ageCut06,'.RData', sep = ''))


coefDistList <- list(naive = as.numeric(honoreNaiveResultsDistance['Naive:All','Estimate']),
                     naiveHonore = as.numeric(honoreNaiveResultsDistance['Naive:Restricted','Estimate']),
                     noLDV = as.numeric(honoreNaiveResultsDistance['Naive:AllNoLagDV','Estimate']),
                     noLDVHonore = as.numeric(honoreNaiveResultsDistance['Naive:AllNoLagDV','Estimate']),
                     main = honoreResList$distAndSwitch$Main[[1]][2] )
coefSwitchList <- list(naive = as.numeric(honoreNaiveResultsSC['Naive:All','Estimate']),
                       naiveHonore = as.numeric(honoreNaiveResultsSC['Naive:Restricted','Estimate']),
                       noLDV = as.numeric(honoreNaiveResultsSC['Naive:AllNoLagDV','Estimate']),
                       noLDVHonore = as.numeric(honoreNaiveResultsSC['Naive:AllNoLagDV','Estimate']),
                       main = honoreResList$distAndSwitch$Main[[1]][1] )
#naiveMSACoefLog <- list(Jacksonville = c(coef =  stataRes[3,'jacksonville']  , stErr =  stataRes[4,'jacksonville']))

#coefDistListJacksonville <- list(naive = as.numeric(naiveMSACoefLog$Jacksonville['coef']),
#                     main = coef(chambResList$justDistLog$jacksonvilleMSA)[[1]] )


